<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%
	String path = request.getContextPath() + "/";
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path;
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<head>
<base href="<%=basePath%>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>朗读亭管理系统</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
	name="viewport">
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
</head>
<body class="hold-transition skin-blue sidebar-mini">
	<div class="wrapper">

		<header class="main-header"> <!-- Logo --> <a href="admin"
			class="logo" style="padding: 0;"><img src="img/s_logo.png">  厦门信昇达
		</a> <nav class="navbar navbar-static-top">  <a href="#"
			class="sidebar-toggle" data-toggle="offcanvas" role="button"> <span
			class="sr-only">Toggle navigation</span>
		</a> 
		<div class="navbar-custom-menu">
			<ul class="nav navbar-nav">
				<li class="dropdown user user-menu"><a href="#"
					class="dropdown-toggle" data-toggle="dropdown"> <img
						src="dist/img/avatar5.png" class="user-image" alt="User Image">
						<span class="hidden-xs">${admin.account }</span> 
				</a>
					<ul class="dropdown-menu">
						<!-- User image -->
						<li class="user-header"><img src="dist/img/avatar5.png"
							class="img-circle" alt="User Image">
							<p>
								${admin.name } <small>${admin.phone }</small>
							</p></li>
						<!-- Menu Body -->
						<li class="user-body"></li>
						<!-- Menu Footer-->
						<li class="user-footer">
							<div class="pull-left">
								<a href="javascript:void(0);" onclick="setPwd();"
									class="btn btn-default btn-flat">修改密码</a>
							</div>
							<div class="pull-right">
								<a href="admin/logout" class="btn btn-default btn-flat">退出</a>
							</div>
						</li>
					</ul></li>

			</ul>
		</div>

		</nav> </header>
		<aside class="main-sidebar"> <section class="sidebar">
		<ul class="sidebar-menu">
			<li class="header"><h2 style="color: #f8f8f8">菜单</h2></li>
			<c:forEach var="menu" items="${list }">
				<c:if test="${menu.pid==0 }">
					<li class="treeview"><a target="mainFrame"
						href="${menu.url==null?'javascript:void(0)':menu.url==''?'javascript:void(0)':menu.url }">
							<c:if test="${menu.name=='系统管理' }">
								<i class="fa fa-laptop"></i>
							</c:if> <c:if test="${menu.name=='用户管理' }">
								<i class="fa fa-user"></i>
							</c:if> <c:if test="${menu.name=='设备管理' }">
								<i class="fa  fa-link"></i>
							</c:if> <c:if test="${menu.name=='素材管理' }">
								<i class="fa fa-pencil-square-o"></i>
							</c:if> <c:if test="${menu.name=='采编管理' }">
								<i class="fa  fa-book"></i>
							</c:if> <span>${menu.name }</span> <span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
						</span>
					</a>
						<ul class="treeview-menu">
							<c:forEach var="menu1" items="${list }">
								<c:if test="${menu.id==menu1.pid }">
									<li><a target="mainFrame"
										href="<%=basePath%>${menu1.url.substring(1) }"><i
											class="fa fa-circle-o"></i>${menu1.name }</a></li>
								</c:if>
							</c:forEach>
						</ul></li>
				</c:if>
			</c:forEach>
		</ul>
		</section> <!-- /.sidebar --> </aside>

		<!-- Content Wrapper. Contains page content -->
		<div class="content-wrapper">
			<!-- Content Header (Page header) -->
			<iframe name="mainFrame" id="mainFrame" src="admin/count"
				width="100%" height="780px"> </iframe>
		</div>
		<footer class="main-footer">
		<div class="pull-right hidden-xs">
			<b>Version</b> 2.3.7
		</div>
		<!-- <strong>Copyright &copy; 2016 <a href="#">厦门信昇达教育科技有限公司</a>.</strong>
		All rights reserved. --> </footer>

		<div class="control-sidebar-bg"></div>

	</div>
	<script src="js/jquery-1.9.1.js"></script>
	<script src="js/bootstrap.js"></script>
	<script src="dist/js/app.min.js"></script>
	<script type="text/javascript" src="js/layer/layer.js"></script>
	<script type="text/javascript">
		function setPwd() {
			layer.open({
				title : '修改密码',
				type : 2,
				area : [ '450px', '230px' ],
				fixed : false, //不固定
				//maxmin: true,
				content : 'admin/update_pwd'
			});
		}
	</script>
</body>
</html>
